import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import * as filters from './filters'
import Element from 'element-ui'
import locale from 'element-ui/lib/locale/lang/ko'
import '@/styles/index.scss'
import './permission.js'
import iconPicker from 'vue-fontawesome-elementui-icon-picker'
import initRules from '@/utils/initRules'
const axios = require('axios')
const moment = require('moment')

const isDev = process.env.NODE_ENV !== 'production'
Vue.config.performance = isDev
Vue.config.productionTip = false
Vue.prototype.$axios = axios
Vue.prototype.moment = moment
Vue.prototype.$initRules = initRules

Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

Vue.use(Element, {
  locale
})
Vue.use(iconPicker)

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
